#include <iostream>

using namespace std;

int main() {
    //感受双循环
    for (int i = 0; i < 4; ++i) {
        for (int j =  0; j <= 2 - i; ++j) {
            cout << " ";
        }
        for (int j =  0; j <= 2 * i; ++j) {
            if (j == 0 || j == 2 * i){
                cout << '*';
            } else {
                cout << ' ';
            }

        }
        cout << endl;
    }
    //图形下半部分
    for (int i = 0; i < 3; ++i) {
        for (int j =  0; j <= i; ++j) {
            cout << " ";
        }
        for (int j =  0; j <= 4 - 2 * i; ++j) {
            //在j是极值的情况下打印星号，否则打印空格
            if (j == 0 || j == 4 - 2 * i){
                cout << '*';
            } else {
                cout << ' ';
            }

        }
        cout << endl;
    }



  /*  //求1-100之间的偶数和
    int sum = 0;
    for (int i = 1; i <= 100; i++) {
        //跳过所有奇数情况
        if (i % 2 == 1)
            continue;
        sum += i;
    }
    cout << "1-100之间的偶数和为：" << sum << endl;*/



   /* //循环输入5个玩家的消费，统计消费低于500的玩家数量
    double money;
    int playerCount = 0; //计数器
    for (int i = 0; i < 5; ++i) {
        cout << "请输入当前玩家的消费额：" << endl;
        cin >> money;
        //跳过500以上的情况
        if (money >= 500)
            continue;
        playerCount++;
    }
    cout << "消费低于500的玩家数量是：" << playerCount << endl;*/



    /*int age;
    for(;;){
        cout << "请输入玩家年龄：" << endl;
        cin >> age;
        if (age < 0){
            cout << "输入的数据非法！" << endl;
            break;
        }
    }
    cout << "程序已结束" << endl;*/



    /*//使用循环打印1997年7月份的日历
    //星期二为1号
    int day = 31;
    int dayOfWeek = 2;
    cout << "一\t二\t三\t四\t五\t六\t日" << endl;
    //打印\t  周几-1
    for (int i = 0; i < dayOfWeek - 1; i++) {
        cout << '\t';
    }
    //打印日子
    for (int i = 1; i <= day; i++) {
        cout << i ;
        if ((i + dayOfWeek -1) % 7 == 0){
            cout << '\n';
        } else {
            cout << '\t';
        }
    }
    cout << endl;*/



   /* //循环输入6个月的工资数，计算半年内的平均工资
    double salary = 0; //工资
    double sum = 0; //总工资
    double avg = 0; //平均工资
    const int YEAR = 6;
    for (int i = 0; i < YEAR; i++) {
        cout << "请输入第" << i + 1 << "个月的工资：" << endl;
        cin >> salary;
        sum +=salary;
    }
    avg = sum / YEAR;
    cout << "6个月的平均工资为：" << avg << endl;*/
    return 0;
}
